﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZGRemote.Common.Message;
using ZGRemote.Common.Message.Remote;
using ZGRemote.Common.Message.RemoteShell;
using ZGRemote.Common.Processor;

namespace ZGRemote.Client.Handler
{
    [CanProcessMessage(typeof(Disconnect))]
    public class RemoteHandler : HandlerBase<RemoteHandler>
    {
        public override void Excute(MessageBase message)
        {
            switch (message)
            {
                case Disconnect disconnect:
                    Disconnect();
                    break;
                
            }
        }

        private void Disconnect()
        {
            Environment.Exit(0);
        }
    }
}
